-- card: 87597 from stack: in -- bmap block id: 95915 -- flags: 4000 -- background id: 95451 -- name: report ----- HyperTalk script ----- on openCard global immediate,questlist,questkey,questans,firstentry --** if necessary to save this card, copy card, rename by adding --** "_name" to end of card name, then delete from here down to --** set the cursor to 4 put false into immediate put the long time into field "stop" put empty into score put empty into field qmissed repeat with i=1 to number of items of questlist if item i of questans = item i of questkey then add 1 to score else put field qmissed & i & "," into field qmissed --put field qmissed & item i of questlist & "," into field qmissed end if end repeat set lockscreen to true delete last character of field qmissed --** and put correct score in next line (and uncomment) --** put 22 into score -- replace 22 with correct score --** also copy card savedscores, rename by adding "_name", and --** edit script for the print button to call correct card names if score is empty then put "0" into field "correct" else put score into field "correct" put the number of items of questlist into field "Q#" if field "Q#" > 0 then put score*100/field "Q#" & "%" into field "Percent" put score*100/field "Q#" into foo else put "0%" into field "Percent" put "0" into foo end if if foo >= 90 then play applause end opencard on build_savedscores global questlist,questans global username put empty into savedscore1 put empty into savedscore2 put empty into savedscore3 repeat with i=1 to number of items of questlist if i < 18 then put savedscore1&item i of questans&return into savedscore1 else if i < 35 then put savedscore2&item i of questans&return into savedscore2 else put savedscore3&item i of questans&return into savedscore3 end if end repeat go card savedscores put username into cd field name put the date into cd field date put savedscore1 into field ans1 put savedscore2 into field ans2 put savedscore3 into field ans3 end build_savedscores on savesc global username doMenu "Copy Card" doMenu "Paste Card" set name of this card to "report_" & username set cantDelete of this card to false set the script of this card to empty set the script of button "save scores" to empty set the script of button "Print Score" to empty build_savedscores doMenu "Copy Card" doMenu "Paste Card" set name of this card to "savedscores_" & username set cantDelete of this card to false set the script of this card to empty show button "Delete Saved" show button "Print Score" go card report end savesc -- part 2 (button) -- low flags: 00 -- high flags: A003 -- rect: left=192 top=296 right=323 bottom=234 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: yes ----- HyperTalk script ----- on mouseUp global questlist -- question # option if field qmissed of card report is empty then answer "Perfect score! No need to review." with "OK" exit mouseUp end if put field qmissed of card report into numWrong repeat with x=1 to the number of items of numWrong put empty into field qmissed of card report get item x of numWrong get item it of questlist -- only required for question # option go card it reView end repeat go card report put numWrong into field qmissed of card report end mouseUp -- part 3 (button) -- low flags: 00 -- high flags: A003 -- rect: left=240 top=296 right=323 bottom=334 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: no, new test ----- HyperTalk script ----- on mouseUp global score,lockkey put empty into field "QMissed" put empty into score put false into lockkey go first card end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: A000 -- rect: left=413 top=290 right=334 bottom=492 -- title width / last selected line: 0 -- icon id / first selected line: 1007 / 1007 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Print Score ----- HyperTalk script ----- on mouseUp lock screen open printing print this card put field QMissed&"," into field QMissed build_savedscores print this card close printing go card report unlock screen end mouseUp -- part 6 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=363 top=295 right=332 bottom=401 -- title width / last selected line: 0 -- icon id / first selected line: 21700 / 21700 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp visual effect iris close go home end mouseUp -- part 12 (button) -- low flags: 00 -- high flags: A000 -- rect: left=421 top=133 right=189 bottom=487 -- title width / last selected line: 0 -- icon id / first selected line: 12451 / 12451 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: save scores ----- HyperTalk script ----- on mouseUp global username put "This will create card savedscores_" & username into foo answer foo with "OK" or "Cancel" if it is "Cancel" then exit mouseUp end if get userlevel put it into savelevel set the userlevel to 5 savesc set the userlevel to savelevel end mouseUp -- part contents for background part 1 ----- text ----- 10:21:39 AM -- part contents for background part 2 ----- text ----- 10:26:33 AM -- part contents for background part 3 ----- text ----- 22 -- part contents for background part 4 ----- text ----- 25 -- part contents for background part 5 ----- text ----- 88%